The present invention relates to an image processing apparatus and method as well as a profile generating method, and more particularly, to an image processing apparatus and method for performing color matching according to ambient light, and a profile generating method.
FIG. 1 is a conceptual view of general color matching.
Input RGB data is converted by an input profile to XYZ data of a color space which does not depend on any devices. Since an output device cannot express colors outside the color reproduction range of the output device, gamut mapping is performed on the inputted data, which has been converted to the data in the device-independent color space, such that all colors of the inputted data fall within the color reproduction range of the output device. After the gamut mapping is performed, the inputted data is converted from the device-independent color space to CMYK data of a color space which is dependent on the output device.
In color matching, a reference white point and ambient light are fixed. For instance, according to a profile specified by the International Color Consortium (ICC), Profile Connection Space (PCS) for associating profiles uses XYZ values or Lab values based on D50 characteristic. Therefore, correct color reproduction is guaranteed when an inputted original document and a printout are viewed under an illuminant of D50 characteristic. Under an illuminant of other characteristics, correct color reproduction is not guaranteed.
When a sample (e.g., an image) is viewed under different illuminants, XYZ values of the viewed sample naturally vary. The XYZ values under various illuminants are predicted by conversion methods such as (1) scaling operation, (2) Von Kries conversion, and (3) prediction formula using a color appearance model.
In the scaling operation method, XYZ values under a reference white point W1 are converted to XYZ values under a reference white point W2 at a ratio of W2/W1. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 become equal to the Lab values under W2. Assuming that XYZ values of a sample under W1(Xw1, Yw1, Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2(Xw2, Yw2, Zw2) are (X2, Y2, Z2), the following relations are obtained by the scaling operation:                                                                         X2                =                                                      Xw2                    Xw1                                    ⁢                                      xe2x80x83                                    ⁢                  X1                                                                                                        Y2                =                                                      Yw2                    Yw1                                    ⁢                                      xe2x80x83                                    ⁢                  Y1                                                                                                        Z2                =                                                      Zw2                    Zw1                                    ⁢                                      xe2x80x83                                    ⁢                  Z1                                                                    }                            (        1        )            
According to the Von Kries conversion, XYZ values under the reference white point W1 are converted to XYZ values under the reference white point W2 at a ratio of W2xe2x80x2/W1xe2x80x2 in a human color perception space PQR. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 do not become equal to the Lab values under W2. Assuming that XYZ values of a sample under W1(Xw1, Yw1, Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2(Xw2, Yw2, Zw2) are (X2, Y2, Z2), the following relations are obtained by Von Kries conversion:                               [                                                    X2                                                                    Y2                                                                    Z2                                              ]                =                                                            [                                                                                                    xe2x80x83                                                                                                                        inv_Mat                                                                                                                          xe2x80x83                                                                                            ]                            ⁢                              xe2x80x83                            [                                                                                          Pw2                      /                      Pw1                                                                            0                                                        0                                                                                        0                                                                              Qw2                      /                      Qw1                                                                            0                                                                                        0                                                        0                                                                              Rw2                      /                      Rw1                                                                                  ]                        ⁢                          xe2x80x83                        [                                                                                xe2x80x83                                                                                                Mat                                                                                                  xe2x80x83                                                                        ]                    ⁢                      xe2x80x83                    [                                                    X1                                                                    Y1                                                                    Z1                                              ]                                    (        2        )            
where                                           [                                                            Pw2                                                                              Qw2                                                                              Rw2                                                      ]                    =                                    [                                                                                          xe2x80x83                                                                                                            Mat                                                                                                              xe2x80x83                                                                                  ]                        ⁢                          xe2x80x83                        [                                                            Xw2                                                                              Yw2                                                                              Zw2                                                      ]                          ⁢                  
                                    (        3        )                                          [                                                    Pw1                                                                    Qw1                                                                    Rw1                                              ]                =                              [                                                                                xe2x80x83                                                                                                Mat                                                                                                  xe2x80x83                                                                        ]                    ⁢                      xe2x80x83                    [                                                    Xw1                                                                    Yw1                                                                    Zw1                                              ]                                    (        4        )                                          [                                                                      xe2x80x83                                                                                    inv_Mat                                                                                      xe2x80x83                                                              ]                =                  [                                                    1.85995                                                              -                  1.12939                                                            0.21990                                                                    0.36119                                            0.63881                                            0                                                                    0                                            0                                            1.08906                                              ]                                    (        5        )                                          [                                                                      xe2x80x83                                                                                    Mat                                                                                      xe2x80x83                                                              ]                =                  [                                                    0.44024                                            0.70760                                                              -                  0.08081                                                                                                      -                  0.22630                                                            1.16532                                            0.04570                                                                    0                                            0                                            0.91822                                              ]                                    (        6        )            
To convert XYZ values under a viewing condition VC1 (including W1) to XYZ values under a viewing condition VC2 (including W2), the prediction formula using a color appearance model, which is a conversion method such as CIE CAM 97s using the human color perception space QMH (or JCH) is employed. Herein, Q for QMH represents brightness, M represents colorfulness, and H represents hue quadrature or hue angle. J for JCH represents lightness, C represents chroma, and H represents hue quadrature or hue angle. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 are not equal to the lab values under W2, as similar to the case of the Von Kries conversion. Assuming that XYZ values of a sample under W1 (Xw1, Yw1, Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2 (Xw2, Yw2, Zw2) are (X2, Y2, Z2), the prediction formula using color appearance model performs the following conversion:
xe2x80x83(X1, Y1, Z1)xe2x86x92[forward conversion of CIE CAM97s]xe2x86x92(Q, M, H) or (J, C, H)xe2x86x92[inverse conversion of CIE CAM97s]xe2x86x92(X2, Y2, Z2)
In other words, if it is assumed that XYZ values under a reference white point which varies depending on a scaling operation can be converted, the contour lines of hue in the Lab color spaces under various reference white points are always the same. However, if human color perception is taken into consideration, such as the Von Kries conversion or prediction formula using a color appearance model, the contour lines of hue in the Lab color spaces under different reference white points vary depending on the reference white points.
Because of the above reason, if gamut mapping (hue restoration) defined under one Lab color space is applied to color matching under different reference white points, the human vision perceives the hue as inconsistent.
Moreover, in the current ICC profile, since the PCS is limited to XYZ values or Lab values based on D50 characteristic, color matching corresponding to ambient light cannot be performed.
The present invention is made in consideration of the above situation, and has as its object to provide an image processing apparatus and method for performing color matching, which enables human vision to perceive a constant hue even under different viewing conditions, and a method of generating a profile.
In order to attain the above object, the present invention provides an image processing apparatus for performing color matching process, the image processing apparatus comprising: first converting means for converting input image data in a color space dependent on an input device to first data, in accordance with a viewing condition at the time of viewing an input original in an independent color space which is independent of any device; second converting means for converting the first data to second data in a human color perception space; third converting means for converting the second data to third data in accordance with a viewing condition at the time of viewing an output original in the independent color space; and fourth converting means for converting the third data to image data to be outputted to an output device in a color space dependent on the output device.
Another object of the present invention is to provide an image processing apparatus and method capable of performing, at high precision and high speed, color matching corresponding to an ambient light without being limited to data of the device-independent color space based on a particular illuminant, and to provide a method of generating a profile.
In order to attain the above object, the present invention provides a profile generating method for generating a profile dependent on a viewing condition, the method comprising the steps of: converting color target data in independent color space to data in a human color perception space based on a condition for measuring the color target data; and converting the data in the color perception space to data in an independent color space, which is independent of any device, based on the viewing condition so as to generate the profile.
Another object of the present invention is to provide an image processing method for obtaining excellent color matching processing results by performing gamut mapping which is suitable to the purpose of color matching.
In order to attain the above object, the present invention provide an image processing method for performing gamut mapping on input image data, the method comprising the steps of: selecting a color matching mode from plural color matching modes; and performing the gamut mapping in accordance with the selected color matching mode.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.